package com.ymatou.app.home.service;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*获取首页买手信息接口Call
*FreeMaker Template自动生成代码
*/
public class GetSellerListCall extends YmatouBaseCall{
	private static String opurl ="/api/Home/GetSellerList";
	
	public GetSellerListCall() {
		super(EnvSetup.getSystemUrl("app_homePage"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	public JSONArray getSeller(){
		JSONArray seller=null;		
		try {
			seller=new JSONObject(getReturnData()).getJSONArray("seller");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}		
		return seller;		
	}
}